#define _CRT_SECURE_NO_WARNINGS 1
#include "InsertSort_ShellSort.h"
int main()
{
	srand(time(0));
	const int N = 100000000;
	int* a1 = (int*)malloc(sizeof(int) * N);
	int* a2 = (int*)malloc(sizeof(int) * N);
	int* a3 = (int*)malloc(sizeof(int) * N);
	int* a4 = (int*)malloc(sizeof(int) * N);
	int* a5 = (int*)malloc(sizeof(int) * N);
	int* a6 = (int*)malloc(sizeof(int) * N);
	for (int i = 0; i < N; ++i)
	{
		a1[i] = rand();
		a2[i] = a1[i];
		a3[i] = a1[i];
		a4[i] = a1[i];
		a5[i] = a1[i];
		a6[i] = a1[i];
	}
	/*int arr1[] = { 6,1,1,2,5,4,9,7,10,11,22,22,11 };
	int arr2[] = { 6,1,1,2,5,4,9,7,10,11,22,22,11 };
	InsertSort(arr1, sizeof(arr1) / sizeof(int));*/
	/*for (int i = 0; i < sizeof(arr1) / sizeof(int); ++i)
	{
		printf("%d ", arr1[i]);
	}
	printf("\n");*/

	/*ShellSort(arr2, sizeof(arr2) / sizeof(int));
	for (int i = 0; i < sizeof(arr2) / sizeof(int); ++i)
	{
		printf("%d ", arr2[i]);
	}
	printf("\n");*/
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	int begin2 = clock();
	ShellSort(a1, N);
	int end2 = clock();
	printf("ShellSort:%d\n", end2 - begin2);
	return 0;
}